
var $list
$.ajax({
    url:url+"public/getLiveList.do",
    data:"",
    type:"get",
    datatype:"json",
    success:function (data) {
        data= JSON.parse(data);
        $list=data;
        console.log($list);
        ListInit($list)
    }
})




function ListInit(List){
    console.log(List.length)
    for(var i=0,j=List.length;i<j;i++)
    {
        console.log(List[i].roomid)
        $('#contentList').append(
            "  <div class='content'>" +
            "         <div class='content-img'><a href='/static/project/view/room/live.html?roomid="+List[i].roomid+"'><img src="+List[i].picturesrc+" width='200px' height='150px' alt='无图片'></a></div>" +
            "         <div class='content-text'>"+List[i].roomname+"</div>" +
            "  </div>"
        )
    }

}

function redirect(data) {
    console.log("redirect"+data);
}